#ifndef _DRV8701E_H
#define _DRV8701E_H


#ifdef __cplusplus
extern "C"
{
#endif

#ifdef __cplusplus
}
#endif

#include "gpio/PWM/pwm.h"

typedef enum{
    PH = 0,
    EN = 1,
}Channel_t;

class DRV8701E:public PWM{
    private:
        uint32_t OUT_MAX;
        uint32_t Limit(uint32_t _out);
    public:
        DRV8701E(uint32_t _out_max=65535):PWM(2),OUT_MAX(_out_max){};
        void DRV_Init();
        void Brake();
        void Forward(uint32_t _out);
        void Reverse(uint32_t _out);
        void SetOut(int32_t _out);
        uint8_t getEN_Channel(){return EN;}
        uint8_t getPH_Channel(){return PH;}
};

#endif

